package cn.edu.sdjzu.knoverse.model.enums;

import lombok.Getter;

@Getter
public enum NodeTypeEnum {
    COURSE("Course", "课程"),
    Knowledge("Knowledge", "知识点"),
    Component("Component", "案例组件"),
    Case("Case", "案例");

    private final String type;
    private final String name;

    NodeTypeEnum(String code, String name) {
        this.type = code;
        this.name = name;
    }

    public static NodeTypeEnum getByCode(String code) {
        for (NodeTypeEnum type : values()) {
            if (type.getType().equals(code)) {
                return type;
            }
        }
        return null;
    }
} 